import java.util.Scanner;

public class Fight {
//      若是先读整数，再读字符串，当我们敲击回车键时，系统会误将回车判定为字符串
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        System.out.println("输入年龄：");
        int age = scan.nextInt();
        System.out.println(age);

        scan.nextLine();

        System.out.println("输入姓名：");
        String name = scan.next();
        System.out.println(name);

        System.out.println("输入工资：");
        float money = scan.nextFloat();
        System.out.println(money);

        scan.close();//读取完释放
    }


    public static void main13(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("输入姓名：");
//        String name = scan.nextLine();
        String name = scan.next();//没有 Line 只有 next ：遇到空格就停止读取
        System.out.println(name);

        System.out.println("输入年龄：");
        int age = scan.nextInt();
        System.out.println(age);

        System.out.println("输入工资：");
        float money = scan.nextFloat();
        System.out.println(money);

        scan.close();//读取完释放
    }


    /**
     * 求 1 - 100 之间，所有既能被 3 整除，又能被 6 整数的数字
     * 要么用 break，要么用 continue
     * @pargma args
     */

    public static void main12(String[] args) {
        int i = 1;
        while(i <= 100) {
            if(i % 6 != 0) {
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }
    }



    public static void main11(String[] args) {
        int i = 0;
        while(i <= 10) {
            if(i == 3) {
                continue;
//                continue表示结束本次循环，直接进入下一次循环
            }
            System.out.println(i);
            i++;
        }
    }


    public static void main10(String[] args) {
        int k = 1;
        int sum = 0;
        while(k <= 5){
            int ret = 1;
            int i = 1;
            while(i <= k){
                ret *= i;
                i++;
            }
            sum += ret;
            k++;
        }
        System.out.println(sum);
    }



    public static void main9(String[] args) {
        int i = 1;
        int ret = 1;
        while(i <= 5) {
            ret *= i;
            i++;
        }
        System.out.println(ret);
    }


    public static void main8(String[] args) {
        int i = 0;
        int sum = 0;
        while(i<=100){
            sum += i;
            i ++;
        }
        System.out.println(sum);
    }


//    IDEL进行调试：
//    1 . 打断点
//    2 . Debug 蓝色底色，表示还未执行当前行
//    3 . 窗口中第一个表示逐过程，第二个是逐语句
//    4 . 最左边的为重新开始调试

    public static void main7(String[] args) {
        int a = 1;
        while(a<=10) {
            System.out.println(a);
            a++;
        }
    }

    public static void main6(String[] args) {

//        判断闰年
        Scanner scan = new Scanner(System.in);
        int year = scan.nextInt();

        if(year % 400 == 0) {
            System.out.println(year + "是世纪闰年");
        }
        else if(year % 4 == 0 && year % 100 == 0){
            System.out.println(year + "是普通闰年");
        }
        else
            System.out.println(year + "不是闰年");
    }


    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        if(a % 2 == 1) {
            System.out.println("奇数");
        }
        else {
            System.out.println("偶数");
        }
    }


    public static void main4(String[] args) {
        boolean flag = true == true ? true == false ? false : true :true;
        System.out.println(flag);
    }


    public static void main3(String[] args) {
        int a = 1;
        int b = 2;
        int ret = a > b ? a : b;
        System.out.println(ret);
    }


    public static void main2(String[] args) {
        int a = 10;
        System.out.println(!(a == 11));
        System.out.println(!(a == 10));
    }


    public static void main1(String[] args) {
        int sum = 0;
        sum = sum + (int)1.2;
//        sum = (int)(sum + 1.2);
//        sum += 1.2;
        System.out.println(sum);
    }
}












